using System;

namespace ContainerVariations.Common
{
    public interface IKnob : IDisposable
    {
        void Turn();
        bool IsDisposed { get; }
    }

    public class Knob : IKnob
    {
        private bool _isDisposed;

        public void Turn()
        {
            Console.WriteLine("Knob: Turning knob.");
        }

        public bool IsDisposed
        {
            get 
            {
                return _isDisposed;
            }
        }

        public void Dispose()
        {
            _isDisposed = true;
            Console.WriteLine("Knob: Disposed.");
        }
    }
}